/*
 * @formatter:off
 * Copyright 2022 Cacao
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this common except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * @formatter:on
 */
package springfox.documentation.oas.mappers;

import io.swagger.v3.oas.models.headers.Header;
import io.swagger.v3.oas.models.media.Encoding;
import org.springframework.stereotype.Component;
import springfox.documentation.service.ParameterStyle;

/**
 * @author XuQx
 * @date 2022/08/26
 */
@Component
public class StyleEnumMapperImpl extends StyleEnumMapper {
    @Override // springfox.documentation.oas.mappers.StyleEnumMapper
    public Header.StyleEnum headerStyle(ParameterStyle from) {
        Header.StyleEnum styleEnum;
        if (from == null) {
            return null;
        }
        switch (AnonymousClass1.$SwitchMap$springfox$documentation$service$ParameterStyle[from.ordinal()]) {
            case 1:
                styleEnum = null;
                break;
            case 2:
                styleEnum = Header.StyleEnum.SIMPLE;
                break;
            case 3:
                styleEnum = null;
                break;
            case 4:
                styleEnum = null;
                break;
            case 5:
                styleEnum = null;
                break;
            case 6:
                styleEnum = null;
                break;
            case 7:
                styleEnum = null;
                break;
            case 8:
                styleEnum = null;
                break;
            default:
                throw new IllegalArgumentException("Unexpected enum constant: " + from);
        }
        return styleEnum;
    }

    /* renamed from: springfox.documentation.oas.mappers.StyleEnumMapperImpl$1  reason: invalid class name */
    /* loaded from: springfox-oas-3.0.0.jar:springfox/documentation/oas/mappers/StyleEnumMapperImpl$1.class */
    static /* synthetic */ class AnonymousClass1 {
        static final /* synthetic */ int[] $SwitchMap$springfox$documentation$service$ParameterStyle = new int[ParameterStyle.values().length];

        static {
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.DEFAULT.ordinal()] = 1;
            } catch (NoSuchFieldError e) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.SIMPLE.ordinal()] = 2;
            } catch (NoSuchFieldError e2) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.MATRIX.ordinal()] = 3;
            } catch (NoSuchFieldError e3) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.LABEL.ordinal()] = 4;
            } catch (NoSuchFieldError e4) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.FORM.ordinal()] = 5;
            } catch (NoSuchFieldError e5) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.SPACEDELIMITED.ordinal()] = 6;
            } catch (NoSuchFieldError e6) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.PIPEDELIMITED.ordinal()] = 7;
            } catch (NoSuchFieldError e7) {
            }
            try {
                $SwitchMap$springfox$documentation$service$ParameterStyle[ParameterStyle.DEEPOBJECT.ordinal()] = 8;
            } catch (NoSuchFieldError e8) {
            }
        }
    }

    @Override // springfox.documentation.oas.mappers.StyleEnumMapper
    public Encoding.StyleEnum encodingStyle(ParameterStyle from) {
        Encoding.StyleEnum styleEnum;
        if (from == null) {
            return null;
        }
        switch (AnonymousClass1.$SwitchMap$springfox$documentation$service$ParameterStyle[from.ordinal()]) {
            case 1:
                styleEnum = null;
                break;
            case 2:
                styleEnum = null;
                break;
            case 3:
                styleEnum = null;
                break;
            case 4:
                styleEnum = null;
                break;
            case 5:
                styleEnum = null;
                break;
            case 6:
                styleEnum = Encoding.StyleEnum.SPACE_DELIMITED;
                break;
            case 7:
                styleEnum = Encoding.StyleEnum.PIPE_DELIMITED;
                break;
            case 8:
                styleEnum = Encoding.StyleEnum.DEEP_OBJECT;
                break;
            default:
                throw new IllegalArgumentException("Unexpected enum constant: " + from);
        }
        return styleEnum;
    }
}